﻿using System;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.Collections.Generic;
using College_content;
using College_entity;

namespace SilverLightDemo.Web
{
    [ServiceContract(Namespace = "")]
    [SilverlightFaultBehavior]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class Service1
    {
        [OperationContract]
        public void DoWork()
        {
            // 在此处添加操作实现
            return;
        }

        // 在此处添加更多操作并使用 [OperationContract] 标记它们
        [OperationContract]
        public List<College> GetAllData()
        {
            DataClasses1DataContext db = new DataClasses1DataContext();
            var query = from i in db.College
                        select i;
            return query.ToList();
        }
    }
}